package com.rpc.exception;

import com.rpc.enumeration.RpcError;

/**
 * @author ZhangYongLiang
 * @Date 2021/11/12 16:10
 */
public class RpcException extends RuntimeException {

    public RpcException(RpcError rpcError) {
        super(rpcError.getMessage());
    }

    public RpcException(RpcError rpcError, String msg) {
        super(rpcError.getMessage() + ": " + msg);
    }

    public RpcException(String message, Throwable cause) {
        super(message, cause);
    }
}
